//
//  AppDelegateDecotor.h
//  LoanOwer
//
//  Created by jk on 2019/5/18.
//  Copyright © 2019 jk. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface AppDelegateDecotor : NSObject<UIApplicationDelegate>

@property (nonatomic, strong) UIViewController * rootVC;

+ (instancetype)shareDector;

@end

/*
 //务必在AppDelegate 做消息转发
 
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
 
 //do nothing
 //....
 
 return [[AppDelegateDecotor shareDector] application:application didFinishLaunchingWithOptions:launchOptions];
 
 }

 
 - (void)applicationWillResignActive:(UIApplication *)application {
 [[AppDelegateDecotor shareDector] applicationWillResignActive:application];
 }
 
 
 - (void)applicationDidEnterBackground:(UIApplication *)application {
 [[AppDelegateDecotor shareDector] applicationDidEnterBackground:application];
 }
 
 
 - (void)applicationWillEnterForeground:(UIApplication *)application {
 [[AppDelegateDecotor shareDector] applicationWillEnterForeground:application];
 }
 
 
 - (void)applicationDidBecomeActive:(UIApplication *)application {
 [[AppDelegateDecotor shareDector] applicationDidBecomeActive:application];
 }
 
 
 - (void)applicationWillTerminate:(UIApplication *)application {
 [[AppDelegateDecotor shareDector] applicationWillTerminate:application];
 }
 
 
 //9.0之前使用
 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
 {
 return [[AppDelegateDecotor shareDector] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
 }
 
 //NOTE: 9.0以后使用新API接口
 - (BOOL)application:(UIApplication *)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
 {
 return [[AppDelegateDecotor shareDector] application:app openURL:url options:options];
 }
 
 */
